<template>
  <div>
    <!--<use-platform-config-->
    <!--  title="支付设置"-->
    <!--  sub-title="使用平台支付"-->
    <!--  config-key="system.package.payment.sync"-->
    <!--  used-tips="启用后，将使用平台的支付方式、收款账户。"-->
    <!--  un-used-tips="关闭后，可自行配置支付方式、收款账户。"-->
    <!--  @change="use_platform = $event"-->
    <!--/>-->
    <!--<page-list v-if="use_platform === 0" :x-uri="uri" :custom-components="custom" row-key="__key" :x-tabs="tabs" :doactions="doactions" :checkbox-item="false" :pagination="false" />-->

    <page-list :x-uri="uri" :custom-components="custom" row-key="__key" :x-tabs="tabs" :doactions="doactions" :checkbox-item="false" :pagination="false" />
  </div>
</template>
<script>
import PageList from '@public/template/page_list.vue';
import Status from './components/status';
// import UsePlatformConfig from '@/components/use-platform-config'

export default {
  components: {
    PageList
    // UsePlatformConfig
  },
  data() {
    return {
      uri: '/admin/system/package/payment/list',
      tabs: [
        {
          title: '支付方式',
          uri: '/system/package/payment',
          meta: {
            permission: 'system.package.payment'
          }
        }
      ],
      custom: {
        status: Status
      },
      doactions: [
        {
          title: '配置',
          meta: { permission: 'system.package.payment' },
          callback: this.config,
          display: ({ row }) => {
            return row.config_btn;
          }
        }
      ],
      use_platform: 1
    };
  },
  mounted() {
    this.$store.dispatch('setLoading', 0);
  },
  methods: {
    config: function({ row }) {
      this.$router.push({ path: '/system/package/payment/' + row.key + '/config' });
    }
  }
};
</script>
